<?php echo $this->doctype(); ?>
<html>
<head>
	<?php echo $this->headMeta(); ?>
	<?php echo $this->headTitle(); ?>
	<?php echo $this->headLink()->prependStylesheet($this->baseUrl() . '/styles/style.css')
                                ->prependStylesheet($this->baseUrl() . '/styles/bootstrap.css');
	?>
								
	<?php echo $this->headScript()->appendFile($this->baseUrl(). '/public/javascript/javascript.js')
                ->prependFile($this->baseUrl() . '/public/javascript/bootstrap.js')
	            ->prependFile($this->baseUrl() . '/public/javascript/Jquery/jquery.js')
                ->appendFile($this->baseUrl() . '/public/javascript/jasny-bootstrap.min.js')
    ;
	
	?>

</head>

<body >
	<div id="baseUrl"><?= $this->baseUrl() ?></div>

    <div class="panel panel-default" id='content'>
        <div class="alert alert-info" id="rodape">
           <?php if(!isset($_SESSION['total'])){
               $_SESSION['total'] = Pessoa::getTotal();
            }
            echo "Registros :" . $_SESSION['total'];
            ?>
        </div>
        <?
        if(isset($_SESSION['msg'])) :?>
            <div class="alert alert-<?= $_SESSION['msg']['tipo'] == 'erro' ? 'danger' : 'success'?>"><?= $_SESSION['msg']['conteudo']?></div>
            <? unset($_SESSION['msg']);?>
        <? else :?>

        <?endif;?>
        <? if (isset($_SESSION['role'])== "GERENTE") : ?>
            <?= $this->partial("header.phtml");?>

            <div class="panel-body">
                <?= $this->layout()->content; ?>

            </div>
        <? else :?>
            <?= $this->action("index","index"); ?>
        <?endif;?>



    </div>

</body>
</html>
